    static List<CompileItem> tempCompiles = new ArrayList<>();
    static List<CompileItem> compiles = new ArrayList<>();
    public static TxtLevel detectTextLevel(String content, TxtLevel lastLevel) {
        if (compiles.isEmpty()) {
            String sNumberEnumArray = "1234567890";
            String bNumberEnumArray = "一二三四五六七八九十百千万零两壹贰叁肆伍陆柒捌玖拾佰仟";
            String splitEnums = ")）、,，\\.";
            String letterEnums = "a-zA-Z";
            int weigth = 1;
            tempCompiles.add(new CompileItem(100 * weigth, "\\s*(?<i>总则)\\s*"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[N]+章)\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[N]+[S]{1})\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[N]+部分)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[N]+节)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[N]+部分[S]{1})\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[n]+章)\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[n]+[S]{1})\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[n]+部分)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[n]+节)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>第[n]+部分[S]{1})\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+、)"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1})\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+[S]{1}[N]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[A]+[S]{1})\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+、)"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1})\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+[S]{1}[n]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+)\\s+"));
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+[S]{1}[n]+)\\s+"));

            weigth++;
            tempCompiles.add(new CompileItem(100 * weigth, "(?<i>[A]+[S]{1})\\s+"));
            for (CompileItem compile : tempCompiles) {
                CompileItem newCompieIte = new CompileItem(compile.level, compile.getPatternText());
                String patternText = compile.getPatternText()
                        .replace("A", letterEnums)
                        .replace("n", sNumberEnumArray)
                        .replace("N", bNumberEnumArray)
                        .replace("S", splitEnums);
                newCompieIte.setPattern(Pattern.compile(patternText));
                compiles.add(newCompieIte);
            }

            compiles.sort((p0, p1) -> Integer.compare(p1.getPatternText().length(), p0.getPatternText().length()));
        }

        TxtLevel currentLevel = null;
        StringBuilder builder = new StringBuilder();
        for (CompileItem compile : compiles) {
            int start = -1;
            int end = -1;
            Matcher matcher = compile.getPattern().matcher(content);
            while (matcher.find()) {
                String numberValue = matcher.group("i");
                if (start == -1) {
                    start = matcher.start();
                    if (start != 0) {
                        break;
                    }
                    end = matcher.end();
                    builder.append(numberValue);
                } else {
                    if (end != matcher.start()) {
                        currentLevel = new TxtLevel(null,
                                compile.getLevel(),
                                builder.toString(),
                                builder.toString(),
                                true);
                        break;
                    } else {
                        start = matcher.start();
                        end = matcher.end();
                        builder.append(numberValue);
                    }
                }
            }
            if (!builder.isEmpty()) {
                currentLevel = new TxtLevel(null,
                        compile.getLevel(),
                        builder.toString(),
                        builder.toString(),
                        true);
                break;
            }
        }

        if (currentLevel != null) {
            if (currentLevel.getWeight() == lastLevel.getWeight()) {
                if (lastLevel.getParent() == null) {
                    return currentLevel;
                }

                return new TxtLevel(lastLevel.getParent(),
                        currentLevel.getWeight(),
                        currentLevel.getRawLevel(),
                        lastLevel.getParent().getStandardLevel() + "." + currentLevel.getStandardLevel(),
                        true);
            } else if (currentLevel.getWeight() > lastLevel.getWeight()) {
                return new TxtLevel(lastLevel,
                        currentLevel.getWeight(),
                        currentLevel.getRawLevel(),
                        lastLevel.getStandardLevel() + "." + currentLevel.getStandardLevel(),
                        true);
            } else {
                TxtLevel parent = lastLevel.getParent();
                while (parent != null) {
                    if (parent.getWeight() == currentLevel.getWeight()) {
                        break;
                    } else {
                        parent = parent.getParent();
                    }
                }
                if (parent != null
                        && parent.getStandardLevelArrary().length > 0
                        && currentLevel.getStandardLevelArrary().length > 0
                        && getLastNumber(parent.getStandardLevelArrary()) + 1 == getLastNumber(currentLevel.getStandardLevelArrary())) {
                    // 同一级
                    if (parent.getParent() == null) {
                        return new TxtLevel(null,
                                currentLevel.getWeight(),
                                currentLevel.getRawLevel(),
                                currentLevel.getStandardLevel(),
                                true);
                    } else {
                        return new TxtLevel(parent.getParent(),
                                currentLevel.getWeight(),
                                currentLevel.getRawLevel(),
                                parent.getParent().getStandardLevel() + "." + currentLevel.getStandardLevel(),
                                true);
                    }
                } else {
                    return currentLevel;
                }
            }
        }

        if (!content.contains(".")
                && !content.contains("。")
                && (content.endsWith("：") || content.endsWith(":"))) {
            if (lastLevel.getStandardLevel().endsWith("__")) {
                int subLevelNumber = XConvertUtils.toInteger(lastLevel.getStandardLevelArrary()[lastLevel.getStandardLevelArrary().length - 1].replace("_", ""));
                return new TxtLevel(lastLevel,
                        lastLevel.getWeight() + 1,
                        "",
                        lastLevel.getStandardLevel().replace("." + subLevelNumber + "__", "." + (subLevelNumber + 1) + "__"),
                        true);
            } else {
                return new TxtLevel(lastLevel,
                        lastLevel.getWeight() + 1,
                        "",
                        lastLevel.getStandardLevel() + ".1__",
                        true);
            }
        }
        return null;
    }
